@extends('layouts.mobile')

@section('content')
    <div class="swiper-div" style="padding-top: 50%;">
        <div class="swiper" id="swiper">
            <ul class="swiper-wrapper">
                @foreach($focusImages as $img)
                    <li class="swiper-slide">
                        <a href="{{$img['url']}}">
                            <div class="bg bg-cover" style="background-image: url({{image_url($img['image'])}})"></div>
                        </a>
                    </li>
                @endforeach
            </ul>
            <div class="swiper-pagination"></div>
        </div>
    </div>
    <script type="text/javascript">
        (function(){
            var swiper = new Swiper('#swiper',
                {loop:true,pagination:'.swiper-pagination',autoplay:2500});
        })();
    </script>

    <div class="global-menus">
        <ul class="wrapper">
            <li data-link="{{url('mobile/food')}}">
                <div class="image"><img src="{{asset('images/mobile/menus/new.png')}}"></div>
                <div class="title">营养餐配送</div>
            </li>
            <li data-link="{{url('mobile/youxuan')}}">
                <div class="image"><img src="{{asset('images/mobile/menus/youxuan.png')}}"></div>
                <div class="title">粗耕优选</div>
            </li>
            <li data-link="{{url('mobile/fupin')}}">
                <div class="image"><img src="{{asset('images/mobile/menus/fupin.png')}}"></div>
                <div class="title">精准扶贫</div>
            </li>
            <li data-link="{{url('mobile/shop')}}">
                <div class="image"><img src="{{asset('images/mobile/menus/pinpai.png')}}"></div>
                <div class="title">品牌计划</div>
            </li>
        </ul>
    </div>
    <div class="banner">
        <img src="{{asset('images/mobile/common/banner.png')}}">
    </div>

    <div class="title-banner" style="background-image: url({{asset('images/mobile/common/qianggou.png')}})"></div>

    <div class="swiper-div" style="padding-top: 50%; background-color: #fff;">
        <div class="swiper" id="swiper2">
            <ul class="swiper-wrapper">
                <li class="swiper-slide">
                    <div class="chaozhi">
                @foreach ($chaoZhi as $item)
                        <div class="item" data-link="{{mobile_item_url($item['itemid'])}}">
                            <div class="image bg-cover" style="background-image: url({{image_url($item['thumb'])}})"></div>
                            <div class="title">{{$item['title']}}</div>
                            <div class="price">￥{{$item['price']}}</div>
                        </div>
                    @if ($loop->iteration%3==0 && !$loop->last)
                    </div></li><li class="swiper-slide chaozhi"><div class="chaozhi">
                    @endif
                @endforeach
                    </div>
               </li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">
        (function(){
            var swiper = new Swiper('#swiper2', {loop:true});
        })();
    </script>

    <div class="title-banner" style="background-image: url({{asset('images/mobile/common/tuijian.png')}})"></div>
    <div class="jingxuan">
        @foreach ($jingXuan as $img)
            <div class="item" data-link="{{url('mobile/catlog/0')}}" style="background-image: url({{image_url($img['image'])}})"></div>
        @endforeach
    </div>

    <div class="title-banner" style="background-image: url({{asset('images/mobile/common/youxuan.png')}})"></div>
    @include('mobile.item.itemgridlist', ['items' => $youxuanList])
    @include('mobile.tabbar', ['tab' => 'home'])
@stop
